// 车牌号验证
// eslint-disable-next-line prefer-regex-literals
export const carNoPattern = new RegExp(
	/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/,
)

// 只能输入数字跟小数点 两位小数
// eslint-disable-next-line prefer-regex-literals
export const twoDecimalPattern = new RegExp(
	/^(([1-9]\d*)|\d)(\.\d{1,2})?$/,
	'g',
)

// 只能输入正整数
// eslint-disable-next-line prefer-regex-literals
export const integerPatternJust = new RegExp(/^[0-9]+$/, 'g')

// 只能输入大于零的正整数
// eslint-disable-next-line prefer-regex-literals
export const integerPattern = new RegExp(/^([1-9][0-9]*)$/, 'g')

// 只能输入字母
// eslint-disable-next-line prefer-regex-literals
export const codePattern = new RegExp(/^[a-zA-Z]+$/, 'g')

// 只能输入正数负数小数点后两位
// eslint-disable-next-line prefer-regex-literals
export const codePatternz = new RegExp(/^([+ -]?([1-9]\d*)|(0))([.]\d{0,2})?$/, 'g')

// 只能输入正数负数整数
// eslint-disable-next-line prefer-regex-literals
export const initPatternz = new RegExp(/^-?\d$|^-?[1 - 9]\d+$|^-?\d +\.\d+$/, 'g')
